//
//  UIColor+ExtUIColor.m
//  WashForU
//
//  Created by 王俊 on 15/11/25.
//  Copyright © 2015年 王俊. All rights reserved.
//

#import "UIColor+ExtUIColor.h"


@implementation UIColor (ExtUIColor)

+ (UIColor *)getColor:(NSString *)hexColor {
    unsigned int red,green,blue;
    NSRange range;
    range.length = 2;
    
    range.location = 0;
    [[NSScanner scannerWithString:[hexColor substringWithRange:range]] scanHexInt:&red];
    
    range.location = 2;
    [[NSScanner scannerWithString:[hexColor substringWithRange:range]] scanHexInt:&green];
    
    range.location = 4;
    [[NSScanner scannerWithString:[hexColor substringWithRange:range]] scanHexInt:&blue];
    
    return [UIColor colorWithRed:(float)(red/255.0f) green:(float)(green / 255.0f) blue:(float)(blue / 255.0f) alpha:1.0f];
}
+ (UIColor *)getTranslucentColor:(NSString *)hexColor andAlpha:(CGFloat) a{
    unsigned int red,green,blue;
    NSRange range;
    range.length = 2;
    
    range.location = 0;
    [[NSScanner scannerWithString:[hexColor substringWithRange:range]] scanHexInt:&red];
    
    range.location = 2;
    [[NSScanner scannerWithString:[hexColor substringWithRange:range]] scanHexInt:&green];
    
    range.location = 4;
    [[NSScanner scannerWithString:[hexColor substringWithRange:range]] scanHexInt:&blue];
    
    return [UIColor colorWithRed:(float)(red/255.0f) green:(float)(green / 255.0f) blue:(float)(blue / 255.0f) alpha:a];
}

+ (UIColor*)todyIndicColor
{
    return [UIColor getColor:@"aeabff"];
}
+ (UIColor*)OTIndicColor
{
    return [UIColor getColor:@"fb994a"];
}
+ (UIColor*)customPurple
{
    return [UIColor getColor:@"6563a4"];
}
+ (UIColor*)customGreen
{
    return [UIColor getColor:@"50d2c2"];
}
+ (UIColor*)customTranGreen
{
   return [UIColor colorWithRed:169.0/255 green:211.0/255 blue:207.0/255 alpha:1];
}
+ (UIColor*)darkTextColor
{
    return [UIColor getColor:@"1d1d26"];
}
+ (UIColor*)leaveIndicColor
{
    return [UIColor getColor:@"ffd16f"];
}
+ (UIColor *)restDayTextColor
{
    return [UIColor colorWithRed:160.0/255 green:158.0/255 blue:196.0/255 alpha:1];
}


@end



